#include <iostream>
#include <string>
#include <unordered_set>
#include <vector>
#define lld long long // long long 的 printf 占位符是 lld
#define ENDL '\n'     // 将 endl 替换为 \n 取消缓冲区
#define mod %
#define LOG(var) std::cout << #var << " = " << (var) << ENDL

using std::cin;
using std::cout;
using std::string;
using std::unordered_set;
using std::vector;
void solve() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> s(m);
  vector<int> t(k);
  for (auto &i : s)
    cin >> i; // LOG(i);
  for (auto &i : t)
    cin >> i;
  vector<int> common;
  unordered_set<int> set_s(s.begin(), s.end());
  unordered_set<int> set_t(t.begin(), t.end());
  vector<int> x; // Ming
  vector<int> y; // Hua

  for (auto ele : set_s) {
    if (set_t.count(ele))
      common.push_back(ele);
  }
  for (auto ele : set_s) {
    if (!set_t.count(ele))
      x.push_back(ele);
  }
  for (auto ele : set_t) {
    if (!set_s.count(ele))
      y.push_back(ele);
  }
  // LOG(common.size() & 1 + x.size());
  // LOG(ENDL);
  // LOG(y.size());
  if ((common.size() & 1) + x.size() > y.size())
    cout << "Ming";
  else
    cout << "Hua";
  cout << ENDL;
}
int main() {
  int T = 1;
  cin >> T;
  while (T--) {
    solve();
  }
}
/*
input
2
5 3 3
1 2 3
3 4 5

5 3 3
1 1 1
2 2 2

output
Ming
Hua
*/